using System;
using System.Collections.Generic;
using Neo4jRestSharp.Neo4jObjectServices;

namespace Neo4jRestSharp.Test
{
    public enum RelationshipType
    {
        Knows, Recruited, WorksFor
    }	

    public class Person : Node
	{
        public const string NAME = "Name";
        public const string TITLE = "Title";              

    	public string Name
    	{
    		get
    		{
    			return this.TryGetProperty(Person.NAME, "");
    		}
			set
			{
				this.SetProperty(Person.NAME, value);
			}
    	}

		public string Title
		{
			get
			{
				return this.TryGetProperty(Person.TITLE, "");
			}
			set
			{
				this.SetProperty(Person.TITLE, value);
			}
		}
    }

    public class MatrixPerson : Person
    {
        public const string ISHUMAN = "IsHuman";
        public const string ISAGENT = "IsAgent";              

		public bool IsHuman
		{
			get
			{
				string val = this.TryGetProperty(MatrixPerson.ISHUMAN, "");
				if (!string.IsNullOrWhiteSpace(val))
					return bool.Parse(val);
				return false;
			}
			set
			{
				this.SetProperty(MatrixPerson.ISHUMAN, value.ToString());
			}
		}

		public bool IsAgent
		{
			get
			{
				string val = this.TryGetProperty(MatrixPerson.ISAGENT, "");
				if (!string.IsNullOrWhiteSpace(val))
					return bool.Parse(val);
				return false;
			}
			set
			{
				this.SetProperty(MatrixPerson.ISAGENT, value.ToString());
			}
		}
    }
}